<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
        <meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;" />  
        <title>Railway Official Website</title>
        <link rel="stylesheet" href="css/foundation.css"/>
        <link rel="stylesheet" href="css/normalize.css"/>
        <link rel="stylesheet" href="css/jquery-ui.css" />
        <script src="js/vendor/jquery.js"></script>
        <script src="js/ui/jquery-ui.js"></script>
        <script src="js/vendor/custom.modernizr.js"></script>
        <?php
        session_start();
        include_once 'classes/Announcement.php';
        include_once 'classes/DBCon.php'
        ?>
    </head>
    <body>
        <div>
            <nav class="top-bar">
                <ul class="title-area">
                    <li class="name" onClick="void(0);">
                        <h1><a href="#">Railway Official Website</a></h1>
                    </li>
                    <li class="divider"></li>
                    <li class="toggle-topbar menu-icon">
                        <a href="#"><span>menu</span></a>
                    </li>
                </ul>
                <section class="top-bar-section">
                    <ul class="right">
                        <li class="divider"></li>
                        <li><a href="index.php">Home</a></li>
                        <li class="divider"></li>
                        <li><a href="forumMain.php">Forum</a></li>
                        <li class="divider"></li>     
                        <li><a href="schedulestatus.php">Schedule Status</a></li>
                        <li class="divider"></li>     
                        <?php
                        if (isset($_SESSION['username'])) {
                            if ($_SESSION['groupId']==1) {
                                echo '<li><a href="announcementMaintenance.php">Announcement</a></li>';
                                echo '<li class="divider"></li> ';
                            }
                            echo '<li><a href="profile.php?mode=21">My profile</a></li>';
                            echo '<li class="divider"></li>';
                            echo '<li><a href="logout.php">Logout</a></li>';
                            echo '<li class="divider"></li>';
                        }
                        else
                            echo '<li><a href="loginPage.php">Login</a></li>';
                            echo '<li class="divider"></li>';
                        ?>
                    </ul>
                </section>
            </nav>
        </div>
        <div class="row">
            <div class="large-8 columns">
                <div class="row">
                    <div class="slideshow-wrapper panel columns">
                        <h4>Highlights</h4>
                        <ul id="highlights" data-orbit data-options="pause_on_hover:false; timer_speed:5000;">
                            <li>
                                <img src="img/images/timetable.png"/>
                                <div class="orbit-caption"><a href="profile.php?mode=26" style="color: white">Click here to purchase your ticket now!</a></div>
                            </li>
                            <li>
                                <img src="img/images/seat.jpg" />
                                <div class="orbit-caption"><a href="#" style="color: white">Timetable, schedules and etc.</a></div>
                            </li>
                        </ul>
                    </div>
                </div>
                <div class="row">
                    <div class="panel columns" style="height: 250px">
                        <h5>Announcement </h5>
                        <div class="columns">
                            <?php
                                $Announce = new Announcement();
                                $Announce->displayAnnouncementBoard();
                                echo '<a href="announcementList.php"  style="size:6;text-align:right">View all</a>';
                            ?>
                        </div>
                    </div>
                </div>
            </div>
            <div class="large-3 columns">
                <div class="row">
                    <div class="columns panel">
                        <h5>Wanted to know today's schedule?</h5>
                        <ul class="side-nav">
                            <li><a href="schedulestatus.php">Click here to find out</a></li>
                            <li class="divider"></li>
                        </ul>
                    </div>
                </div>
            </div>
        </div>
        <footer class="row">
            <div class="large-12 columns">
                <hr />
                <div class="row">
                    <div class="large-4 columns">
                        <p>&copy; Copyright 2013.</p>
                    </div>
                    <div class="large-6 columns">
                        <ul class="inline-list right">
                            <li><a href="aboutus.php">About Us</a></li>
                            <li><a href="contactus.php">Contact Us</a></li>
                            <li><a href="terms.php">Terms and Condition</a></li>
                        </ul>
                    </div>
                </div>
            </div>
        </footer>
        <script src="js/foundation.min.js"></script>
        <script>
                        $(document).foundation();
        </script>
    </body>
</html>